/**
 * 
 */
package cn.edu.cqu.bysj.wm.gui;

import java.awt.BorderLayout;

import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.SwingConstants;
import java.awt.Font;
import java.awt.Color;

/**
 * @author Meng
 * 
 */
public class AboutDialog extends JDialog {

	private final JPanel contentPanel = new JPanel();
	private JLabel lblNewLabel;

	/**
	 * create about dialog
	 */
	public AboutDialog() {
		setTitle("about");
		setBounds(100, 100, 450, 300);
		getContentPane().setLayout(new BorderLayout());
		contentPanel.setBackground(new Color(250, 240, 230));
		contentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(contentPanel, BorderLayout.CENTER);
		{
			lblNewLabel = new JLabel(
					"<html><center>Community & Key Node Detection Display Platform<br>\r\n<br>\r\nVersion: 1.0.0<br>\r\nBuild id: 20120605-1629<br>\r\n<br>\r\nCopyright Wang Meng @cqu.edu.cn<br>\r\nContact wangmengcqu@gmail.com<br></center></html>");
			lblNewLabel.setBackground(new Color(255, 240, 245));
			lblNewLabel.setFont(new Font("Kristen ITC", Font.PLAIN, 16));
			lblNewLabel.setHorizontalAlignment(SwingConstants.CENTER);
		}
		GroupLayout gl_contentPanel = new GroupLayout(contentPanel);
		gl_contentPanel.setHorizontalGroup(
			gl_contentPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(Alignment.TRAILING, gl_contentPanel.createSequentialGroup()
					.addContainerGap(41, Short.MAX_VALUE)
					.addComponent(lblNewLabel)
					.addGap(26))
		);
		gl_contentPanel.setVerticalGroup(
			gl_contentPanel.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_contentPanel.createSequentialGroup()
					.addGap(21)
					.addComponent(lblNewLabel)
					.addContainerGap(32, Short.MAX_VALUE))
		);
		contentPanel.setLayout(gl_contentPanel);
		setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
		setVisible(true);
		ProgressDialog.setToScreenCenter(this);
	}

}
